package cn.zsb.zsb.ctrl;

import cn.zsb.zsb.config.ZsbDataSource;
import cn.zsb.zsb.vo.RedisConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author oldliu
 * @since 1.0
 */
@RestController
public class TestController {

    //    @Value("${myredis.port")
//    private int port;
    @Autowired
    private RedisConfig config;

    @Autowired
    private ZsbDataSource ds;

    @RequestMapping("show")
    public RedisConfig show() {
        return config;
    }

    @RequestMapping("showds")
    public String showds() {
        return String.valueOf(ds);
    }
}
